package com.photo.dao.ibatis;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.dao.DataAccessException;
import com.photo.dao.UserDao;
import com.photo.dao.domain.User;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2008-8-6
 * Time: 14:01:19
 * To change this template use File | Settings | File Templates.
 */
public class SqlMapUserDao extends SqlMapClientDaoSupport implements UserDao {

    public Integer insertUser(User user)  {
           return (Integer)getSqlMapClientTemplate().insert("insertUser", user);
    }

    public List queryUser(User user) {

        return getSqlMapClientTemplate().queryForList("queryUser",user);
    }

    public void updateUser(User user) {
        getSqlMapClientTemplate().update("updateUser",user);
    }


}
